<?php
/**
* @version		$Id: online_counter.settings.inc 2013-10-15 OnlineCounter $
* @package		ONLINE COUNTER
* @copyright            Copyright (C) 2013 OnlineCounter. All rights reserved.
* @license		GNU/GPL
* @website		http://www.online-counter.org
* @email		admin@online-counter.org
* 
*/

/**
 * @file
 * Settings page callback file for the online counter module.
 */

function online_counter_settings() {  
  $form['online_counter_settings'] = array(
    '#type' => 'fieldset',
    '#weight' => -20,
    '#title' => t('Counter settings'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE
  );
  
  $form['online_counter_settings']['title'] = array(
      '#type' => 'textfield',
      '#size'=> 20,
      '#title' => t('Title'),
      '#default_value' => variable_get('title', 'Online Counter'),
      '#field_suffix' => t("Title of this module."),
      );
  
  $form['online_counter_settings']['number_digits'] = array(
      '#type' => 'textfield',
      '#size'=> 5,
      '#title' => t('Min Number Digits'),
      '#default_value' => variable_get('number_digits', 5),
      '#description' => t("The minimum number of digits. Show leading zero-number if it larger than the number of digits of the counter."),
      );
      
  $form['online_counter_settings']['width'] = array(
      '#type' => 'textfield',
      '#size'=> 10,
      '#title' => t('Module Width'),
      '#default_value' => variable_get('width', ''),
      '#field_suffix' => t("The width of this module."),
      );
  
  $form['online_counter_settings']['today'] = array(
      '#type' => 'textfield',
      '#size'=> 10,
      '#title' => t('Today'),
      '#default_value' => variable_get('today', 'Today'),
      '#field_suffix' => t("Translate this to your language."),
      );
  
  $form['online_counter_settings']['xweek'] = array(
      '#type' => 'textfield',
      '#size'=> 10,
      '#title' => t('This Week'),
      '#default_value' => variable_get('xweek', 'Week'),
      '#field_suffix' => t("Translate this to your language."),
      );
  
  $form['online_counter_settings']['xmonth'] = array(
      '#type' => 'textfield',
      '#size'=> 10,
      '#title' => t('This Month'),
      '#default_value' => variable_get('xmonth', 'Month'),
      '#field_suffix' => t("Translate this to your language."),
      );
  
  $form['online_counter_settings']['all'] = array(
      '#type' => 'textfield',
      '#size'=> 10,
      '#title' => t('All'),
      '#default_value' => variable_get('all', 'Total'),
      '#field_suffix' => t("Translate this to your language."),
      );
  
  $form['online_counter_settings']['online'] = array(
      '#type' => 'textfield',
      '#size'=> 10,
      '#title' => t('Users Online'),
      '#default_value' => variable_get('online', 'Users Online:'),
      '#description' => t("Show number of online visitors (default: 15 minutes ago). Translate to your language."),
      );
  
  return system_settings_form($form);
}